package com.unei.guava.demo.base;

import com.google.common.base.Preconditions;
import org.junit.Test;

public class PreconditionsDemo {

    /**
     * Preconditions
     * checkNotNull(T object,Object message)
     * checkElementIndex(int index,int size,Object message)
     * checkArgument(Boolean expression,Object message)
     * checkState(Boolean expression,Object message)
     */
	@Test
	public void test(){
		//Preconditions.checkNotNull(null);
		Object o=new Object();
		boolean b=false;
		Preconditions.checkArgument(o!=null&&b, "%s is null or %s is false", "o","b");
	}

}
